<?php
declare (strict_types = 1);

namespace app\api\controller\v1;

use app\api\controller\ApiController;
use app\api\service\ApiResponse;
use app\api\traits\Curd;

class Category extends ApiController
{
    protected $middleware = ['Token'];
    protected $modelName = 'SupplyCategory';
   
    use Curd;

    public function index()
    {
        list($page, $limit, $where) = $this->buildTableParames();
        $list = $this->model
                ->where('status',1)
                ->page($page, $limit)
                ->order($this->sort)
                ->select();
        return ApiResponse::success($list);
    }

}